import request from '@/utils/request'

// 入库单查询接口   
export const querySelectStockroomApi = (data) => {
    return request({
        url: '/system/inventory/selectStockroom',
        method: 'get',
        params:data
    })
}
// 入库单删除接口
export const deleteSelectStockroomApi = (data) => {
    return request({
        url: '/system/inventory/deleteStockroom',
        method: 'post',
        data
    })
}
// 新增入库单
export const createInsertStockroomApi = (data) => {
    return request({
        url: '/system/inventory/insertStockroom',
        method: 'post',
        data
    })
}
// 查询入库申请付款单
export const querySelectPaymentApi = (data) => {
    return request({
        url: '/system/inventory/selectPayment',
        method: 'get',
        params:data
    })
}
// 新增入库申请付款单
export const addInsertApplicationApi = (data) => {
    return request({
        url: '/system/inventory/insertApplication',
        method: 'post',
        data
    })
}
// 删除入库申请付款单
export const deleteApplicationApi = (data) => {
    return request({
        url: '/system/inventory/deleteApplication',
        method: 'post',
        data
    })
}
// 修改入库申请付款单(未完成)        !!!!!!!!!!!!!!!!!!!
export const updateSelectPaymentApi = (data) => {
    return request({
        url: '/system/inventory/updatePayment',
        method: 'get',
        params:data
    })
}
// 出库单查询接口 
export const querySelectOutboundApi = (data) => {
    return request({
        url: '/system/inventory/selectOutbound',
        method: 'get',
        params:data
    })
}
// 新增出库单(未完成)       !!!!!!!!!!!!!!!!!!!!!!!
export const addInsertOutboundApi = (data) => {
    return request({
        url: '/system/inventory/insertOutbound', 
        method: 'post',
        data
    })
}
// 出库单删除接口 
export const deleteSelectOutboundApi = (params) => {
    return request({
        url: '/system/inventory/deleteOutbound',
        method: 'post',
        data:params
    })
}
// 仓库设置查询 
export const querySelectWarehouseApi = (params) => {
    return request.get('/system/inventory/selectWarehouse',{params})
}
// 仓库修改
export const updateWarehouseApi = (data) => {
    return request({
        url: '/system/inventory/updateWarehouse',
        method: 'put',
        data
    })
}
// 仓库新增     
export const createInsertWarehouse = (data) => {
    return request({
        url: '/system/inventory/insertWarehouse',
        method: 'post',
        data
    })
}

// 查询耗材供应商     
export const querySelectSupplierApi = (data) => {
    return request({
        url: '/system/inventory/selectSupplier',
        method: 'get',
        params:data
    })
}
// 新增耗材供应商     
export const createInsertSupplierApi = (data) => {
    return request({
        url: '/system/inventory/insertSupplier',
        method: 'post',
        data
    })
}
// 删除耗材供应商 
export const deleteSupplierApi = (data) => {
    return request({
        url: '/system/inventory/deleteSupplier',
        method: 'post',
        data
    })
}
// 删除仓库 
export const deleteWarehouseApi = (data) => {
    return request({
        url: '/system/inventory/deleteWarehouse',
        method: 'post',
        data
    })
}
// 商品查询接口
export const querySelectProductApi = (data) => {
    return request({
        url: '/system/inventory/selectProduct',
        method: 'get',
        params:data
    })
}
// 商品新增接口
export const addInsertProductApi = (data) => {
    return request({
        url: '/system/inventory/insertProduct',
        method: 'post',
        data
    })
}
// 商品删除接口 
export const deleteProductApi = (data) => {
    return request({
        url: '/system/inventory/deleteProduct',
        method: 'post',
        data
    })
}
// 商品修改接口(未完成)        !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
export const updateProductApi = (data) => {
    return request({
        url: '/system/inventory/updateProduct',
        method: 'post',
        data
    })
}
// 查询供应商欠款详情
export const querySupplierArrearsApi = (data) => {
    return request({
        url: '/system/inventory/selectSupplierArrears',
        method: 'get',
        params:data
    })
}
// 库存预警
export const querySelectWarningApi = (data) => {
    return request({
        url: '/system/inventory/selectWarning',
        method: 'get',
        params:data
    })
}